﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="DoAnWeb.DangKy" %>
<%@ Register assembly="MSCaptcha" namespace="MSCaptcha" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 1148px;
            margin:auto;
        }
        .style2
        {
            height: 50px;
            width: 10%;
        }
    </style>
    <script type="text/javascript">
        function KiemTraMatKhau(e, args) {
            if (args.Value.Length >= 6)
                args.IsValid = true;
            else
                args.IsValid = false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <center><div class="main-register">
        &nbsp;<table cellpadding="2" cellspacing="0" class="style1">
            <tr>
                <td class="main-register-tieude" colspan="4">
                    <h1>ĐĂNG KÝ TÀI KHOẢN</h1></td>
            </tr>
            <tr>
                <td colspan="4">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" width="20%">
                    Họ tên</td>
                <td style="border-color: #CCC; border-width: 1px; border-right-style: solid;" 
                    width="40%" colspan="2">
                    <asp:TextBox ID="txtHoTen" runat="server" Height="30px" Width="327px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvHoTen" runat="server" 
                        ControlToValidate="txtHoTen" ErrorMessage="Nhập họ tên" ForeColor="#CC0000" 
                        SetFocusOnError="True">*</asp:RequiredFieldValidator>
                </td>
                <td style="  text-align: center;" rowspan="14">
                    Bạn đã là thành viên&nbsp;?<br />
                    <br />
                   
                    <asp:Button ID="Button2" runat="server" Height="50px" Text="Đăng nhập" 
                        Width="250px" PostBackUrl="~/Login.aspx" />
                   
                    </td>
            </tr>
            <tr>
                <td class="style2">
                    Nickname</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtNickname" runat="server" Height="30px" Width="327px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNickname" runat="server" 
                        ControlToValidate="txtNickname" ErrorMessage="Nhập Nickname" 
                        ForeColor="#CC0000" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style2" style="height: 20px">
                    &nbsp;</td>
                <td style="border-color: #CCC; border-width: 1px; border-right-style: solid;" 
                    width="40%" colspan="2">
                    <span style="color: rgb(102, 102, 102); font-family: arial; font-size: 13px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;">
                    Nickname không được có khoảng trắng
                    và không có ký 
                    <br />
                    tự đặc biệt</span></td>
            </tr>
            <tr>
                <td class="style2">
                    Email</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtEmail" runat="server" Height="30px" Width="327px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" 
                        ControlToValidate="txtemail" ErrorMessage="Nhập Email" ForeColor="#CC0000" 
                        SetFocusOnError="True">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="Email sai định dạng abc@abc.abc" 
                        ForeColor="#CC0000" SetFocusOnError="True" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Điện thoại</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtDienThoai" runat="server" Height="30px" Width="327px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvDienThoai" runat="server" 
                        ControlToValidate="txtDienThoai" ErrorMessage="Nhập điện thoại" 
                        ForeColor="#CC0000" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revDienThoai" runat="server" 
                        ControlToValidate="txtDienThoai" ErrorMessage="Điện thoại sai định dạng " 
                        ForeColor="#CC0000" SetFocusOnError="True" ValidationExpression="(D-)?\d{5}">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Mật khẩu</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtMatKhau" runat="server" Height="30px" Width="327px" 
                        TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvMatKhau" runat="server" 
                        ControlToValidate="txtMatKhau" ErrorMessage="Nhập mật khẩu" ForeColor="#CC0000" 
                        SetFocusOnError="True">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="cvMatKhau" runat="server" 
                        ClientValidationFunction="KiemTraMatKhau" 
                        ErrorMessage="Mật khẩu phải hơn 5 ký tự" ForeColor="#CC0000" 
                        SetFocusOnError="True" ControlToValidate="txtMatKhau">*</asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Nhập lại MK</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtNhapLaiMK" runat="server" Height="30px" Width="327px" 
                        TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNhapLaiMK" runat="server" 
                        ControlToValidate="txtNhapLaiMK" ErrorMessage="Nhập lại mật khẩu" 
                        ForeColor="#CC0000" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cvNhapLaiMK" runat="server" 
                        ControlToCompare="txtMatKhau" ControlToValidate="txtNhapLaiMK" 
                        ErrorMessage="Mật khẩu nhập lại không đúng" ForeColor="#CC0000" 
                        SetFocusOnError="True">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Giới tính</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:DropDownList ID="ddlGioiTinh" runat="server" Height="30px">
                        <asp:ListItem>Choose...</asp:ListItem>
                        <asp:ListItem>Nam</asp:ListItem>
                        <asp:ListItem>Nữ</asp:ListItem>
                    </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CompareValidator ID="cvGioiTinh" runat="server" 
                        ControlToValidate="ddlGioiTinh" ErrorMessage="Chọn giới tính" 
                        ForeColor="#CC0000" Operator="NotEqual" SetFocusOnError="True" 
                        ValueToCompare="Choose...">*</asp:CompareValidator>
                    </td>
            </tr>
            <tr>
                <td class="style2">
                    Ngày sinh</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:DropDownList ID="DropDownList2" runat="server" Height="30px" Width="69px">
                        <asp:ListItem>1</asp:ListItem>
                    </asp:DropDownList>
&nbsp;
                    <asp:DropDownList ID="DropDownList3" runat="server" Height="30px" Width="69px">
                        <asp:ListItem>2</asp:ListItem>
                    </asp:DropDownList>
&nbsp;
                    <asp:DropDownList ID="DropDownList4" runat="server" Height="33px" Width="95px">
                        <asp:ListItem>1992</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Bạn là </td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:DropDownList ID="ddlLoaiTK" runat="server" Height="30px" Width="150px">
                        <asp:ListItem>Member</asp:ListItem>
                        <asp:ListItem>Doanh nghiệp</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Mã xác nhận</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <cc1:CaptchaControl ID="CaptchaControl1" runat="server" />
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:TextBox ID="txtCaptcha" runat="server" Height="30px" Width="179px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvMaXacNhan" runat="server" 
                        ControlToValidate="txtCaptcha" ErrorMessage="Nhập mã xác nhận" 
                        ForeColor="#CC0000" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:CheckBox ID="cbNhanDeal" runat="server" Height="30px" 
                        Text="  Nhận thông báo Deal hằng ngày qua email" />
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    <asp:CheckBox ID="cbDongY" runat="server" Height="30px" 
                        Text="  Tôi đồng ý với các" />
                    <asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#0095DA" Width="158px">Quy chế giao dịch</asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td width="40%" 
                    style="border-color: #CCC; border-right-style: solid; border-width: 1px" 
                    colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td width="40%" colspan="2">
                   
                    <asp:Button ID="btnDangKy" runat="server" Height="50px" Text="Đăng ký" 
                        Width="250px" onclick="btnDangKy_Click" />
                   
                    </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" style="padding:50px 0px 50px 50px;">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                        EnableTheming="True" ForeColor="#CC0000"
                        HeaderText="<b>Error List :</b>" />
                </td>
                <td colspan="2">
                    &nbsp;</td>
            </tr>
        </table>
    </div></center> 
</asp:Content>
